package com.desmao.db;

/**
 * @Author: denghp
 * @Date: 15-11-10
 * @Time: 下午1:22
 * @Description:
 */
public class DynamicDataSourceHolder {

    private static final ThreadLocal<String> dsHolder = new ThreadLocal<String>();

    public static String getDataSource() {
        return dsHolder.get();
    }

    public static void putDataSource(String value) {
        dsHolder.set(value);
    }

    public static void clear(){
        dsHolder.remove();
    }
}
